package com.jucai.pppeiyouclient.adapter;

import android.content.Context;

import com.jucai.pppeiyouclient.R;
import com.jucai.pppeiyouclient.base.CommonRecyclerViewAdapter;
import com.jucai.pppeiyouclient.bean.BankCardBean;

import java.util.List;

/**
 * Created by Kuky on 2017-04-17.
 */

public class BankCardAdapter extends CommonRecyclerViewAdapter<BankCardBean> {

    public BankCardAdapter(Context context, List<BankCardBean> data) {
        super(context, data);
    }

    @Override
    public void bindHolder(CommonHolder holder, BankCardBean bankCardBean) {
//        holder.setImage(R.id.bank_label, bankCardBean.getBankLabel());
        if (bankCardBean.getCredit_cardinfo() == 0) {
            holder.setText(R.id.bank_card_type, "借记卡");
        }
        holder.setText(R.id.card_number, bankCardBean.getCredit_card());
    }

    @Override
    protected int getItemType(int position) {
        return 0;
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.item_bank_card_layout;
    }
}
